import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import iView from 'iview';
import 'iview/dist/styles/iview.css';
Vue.use(iView)

import http from "@/assets/js/http";

import 'viewerjs/dist/viewer.css'
import Viewer from 'v-viewer'
Vue.use(Viewer)



Vue.use(http, {
  timeout: 60000,
  inRequest (config) {

    console.log("VUE_APP_PREVIEW",process.env)
    // 这个应该是加权限验证的
    config.headers['Authorization'] = sessionStorage.getItem('AccessToken');
    return config;
  },
  inResponse (response) {
    return response;
  }
});

Vue.config.productionTip = false
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
